class Solution 
{
public:
    void moveZeroes(vector<int>& nums) 
    {
        int cur = 0, dest = 0;
        int sz = nums.size();

        while(cur < sz)
        {
            if(nums[cur])
            {
                swap(nums[dest++], nums[cur]);
            }

            ++cur;
        }
    }
};